<?
    define("rootpath","/var/www/html/new/d/");
    $host = explode('.', $_SERVER['HTTP_HOST']);
    include "header_meta.html";
?>
<body>
    <div class="pageHeader">
        <div id="siteHeadBar" class="siteHeadBar">
            <div class="siteHeadCon ui-width1000">
                <div class="topLink">
                    <span class="welc">您好，<a id="site_account_name" class="site_account_name ui-link" href="account_info.html"><?=$_SESSION['sdname']?$_SESSION['sdname']."：":""?><?=$_SESSION['dname']?></a></span>
                    <a href="notice.html?inbox" class="xiaoxi ui-link">消息（<span class="orange"><?=$_SESSION['unreadmsg']?></span>）</a>
                    <span class="greyline">|</span>
                    <a href="javascript:void(0)" class="logout ui-link" id="logout">[退出]</a>
                <span class="rt">
                    <a href="#" class="setHome" id="setHome">设为首页</a>
                    <span>|</span>
                    <a href="#" class="addFav" id="addFav">加入收藏</a>
                </span>
                </div>
            </div>
        </div>
        <div id="siteHead" class="siteHead ui-width1000">
            <?if($_SERVER['HTTP_HOST']=='www.16u.cc'):?>
                <div class="logo">
                    <!--云游，好票网定制点击logo不跳转网址-->
                    <span><a href="http://www.16u.cc"><img src="http://www.12301.cc/shops/images/123666/14410713081485.png" /></a></span>
                </div>
            <?else:?>
                <div class="logo">
                    <span><a href="http://<? $nosee = array('9117you.12301.cc','haopiao.12301.cc','www.16u.cc');if(in_array($h_config[$httphost]['host'],$nosee)){}else{?><?=$httphost?><?}?>"><img src="<?=$h_config[$httphost]['logo']?>" /></a></span>
                </div>
            <?endif;?>
            <a class="siteTopBanner" href="http://www.12301.cc/recharge_activity.html"><!--javascript:void(0)-->
                <img src="http://www.12301.cc/images/header_top.gif" />
            </a>
        </div>
        <div id="siteNavBar" class="siteNavBar">
            <ul class="navBarUl ui-width1000">
                <li class="navLi home active"><a href="home.html">我的平台首页</a></li>
            </ul>
        </div>
    </div>
    <div id="siteLocationBar" class="siteLocationBar ui-width1000">
        <?=Navi::breadcrumb($pages, $depth)?>
    </div>
    <script type="text/javascript">
        var PageBaseInit = (function(win,doc){
            var scrollTime = 200;
            var timer = null;
            var siteGotopBtn = null;
            function init(){
                var $doc = $(document);
                $("#logout").on("click",function(e){
                    logout();
                    e.preventDefault();
                })
                $("#addFav").on("click",function(e){
                    AddFavorite("http://www.12301.cc/",'票付通');
                    e.preventDefault();
                })
                $("#setHome").on("click",function(e){
                    SetHome(this,"http://www.12301.cc/");
                    e.preventDefault();
                })
                $("#siteGotopBtn").on("click",function(e){
                    $("html,body").animate({"scrollTop":0});
                })
                siteGotopBtn = $("#siteGotopBtn");
                $doc.scroll(function(){
                    clearTimeout(timer);
                    timer = setTimeout(function(){
                        if($doc.scrollTop()>200){
                            siteGotopBtn.css("display","block");
                        }else{
                            siteGotopBtn.css("display","none");
                        }
                    },scrollTime)
                })
            }
            //登出
            var logout = function(){
                $.ajax({
                    "url":"call/handle.php",
                    "data":{"from":"logout"},
                    "dataType":"json",
                    "success":function(data){
                        if(data.outcome==2){
                            window.location.href=data.link;
                        }else{
                            window.location.href="http://www.12301.cc/dlogin_n.html";
                        }
                    },
                    "error":function(){
                        window.location.href="http://www.12301.cc/dlogin_n.html";
                    }
                });
            };
            //加入收藏
            var AddFavorite = function(sURL, sTitle){
                try{
                    window.external.addFavorite(sURL, sTitle);
                }catch(e){
                    try{
                        window.sidebar.addPanel(sTitle, sURL, "");
                    }catch(e){
                        alert("加入收藏失败，请使用Ctrl+D进行添加");
                    }
                }
            }
            //设为首页
            var SetHome = function(obj,vrl){
                if (document.all){
                    document.body.style.behavior='url(#default#homepage)';
                    document.body.setHomePage(window.location.href);
                }else if (window.sidebar){
                    if(window.netscape){
                        try{
                            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                        }catch (e){
                            alert( "该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true" );
                        }
                    }
                    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
                    prefs.setCharPref('browser.startup.homepage',window.location.href);
                }else{
                    alert('您的浏览器不支持自动自动设置首页, 请使用浏览器菜单手动设置!');
                }
            }

            return{
                init : init
            }

        })(window,document);
        //页面初始化
        $(function(){ PageBaseInit.init() })
    </script>














